package com.huazai.lock;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @author huazai
 * @date 2024/2/2
 */
public class ThreadDemo4 {
    public static void main(String[] args) {
        final List<Object> objects = new ArrayList<>();
        objects.add(1);
        final List<Object> objects1 = Collections.synchronizedList(new ArrayList<>());
        final CopyOnWriteArrayList<Object> objects2 = new CopyOnWriteArrayList<>();
        objects2.add("x");
    }
}
